package xyz.zq.cloud.admin.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import xyz.zq.cloud.admin.mapper.RoleMapper;
import xyz.zq.cloud.admin.service.RoleService;
import xyz.zq.cloud.bs.api.entity.Role;

import java.util.List;

/**
 * <p>
 * 角色表 服务实现类
 * </p>
 *
 * @author hzq
 * @since 2020-05-11
 */
@Service
public class RoleServiceImpl extends ServiceImpl<RoleMapper, Role> implements RoleService {


    /**
     * 通过用户ID，查询角色信息
     *
     * @param userId
     * @return
     */
    @Override
    public List<Role> listRolesByUserId(Integer userId) {
        return baseMapper.listRolesByUserId(userId);
    }
}
